import api from "../../api/http.js"
import url from "../../api/urlConst.js"
import {createOrderVo} from '../../common/js/orderVo.js'

export function getOrderList(status) {
  return api.get(url.buyer.order.orderList, {orderStatus: status})
}

export function normalizeOrderVos(list) {
  let res = []
  list.forEach((item) => {
    res.push(createOrderVo(item))
  })
  return res
}
